package com.yaoweigroup.community.ui.bm;

import java.util.ArrayList;
import java.util.List;

import com.yaoweigroup.community.R;
import com.yaoweigroup.community.adapter.MenuAdapter;
import com.yaoweigroup.community.adapter.MenuDetailAdapter;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

/**
 * 商铺详情页面
 * 
 * @author xi
 * 
 */
public class MenuInfoActivity extends Activity implements OnClickListener {

	private RelativeLayout left_rl;
	private ListView menu_listView;
	private ListView menuDetail_listView;
	private MenuAdapter menuAdapter;
	private MenuDetailAdapter menuDetailAdapter;
	private List<String> menuList;
	private List<String> menuDetailList;

	private TextView ok_tv;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_menu_info);

		ok_tv = (TextView) findViewById(R.id.ok_tv);
		ok_tv.setOnClickListener(this);
		left_rl = (RelativeLayout) findViewById(R.id.left_rl);
		left_rl.setOnClickListener(this);

		menu_listView = (ListView) findViewById(R.id.menu_listView);
		menuDetail_listView = (ListView) findViewById(R.id.menuDetail_listView);

		menuList = new ArrayList<String>();
		menuList.add("");
		menuDetailList = new ArrayList<String>();
		menuDetailList.add("");

		menuAdapter = new MenuAdapter(this, menuList);
		menuDetailAdapter = new MenuDetailAdapter(this, menuDetailList);

		menu_listView.setAdapter(menuAdapter);
		menuDetail_listView.setAdapter(menuDetailAdapter);
	}

	private Intent intent;

	@Override
	public void onClick(View v) {

		switch (v.getId()) {
		case R.id.left_rl:
			finish();
			break;
		case R.id.ok_tv:
			intent = new Intent(this, OrderSubmitActivity.class);
			startActivity(intent);
			break;
		}
	}

}
